package com.ruanxie.context;

/**
 * 当前会话的用户的信息能存储在这里
 */
public class BaseContext {
    //TODO 完善：感觉可以把专业放这里
    public static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(String id) {
        threadLocal.set(id);
    }

    public static String getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
